<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../org/angular.min.js"></script>
    <style>
        input.active {
           background-color: yellow;
        }
        .box {
            display: none;
          border: 1px solid #ccc;
          height: 100px;
          width: 100px;
        }
        .box.current {
           display: block;
        }
    </style>
</head>
<body ng-app="model">
    <div ng-controller="ctrl">
    <div>
        <input type="button" ng-repeat='k in obj' ng-value="k" ng-class="$index==now?'active':''" ng-click="setIndex($index)">
    </div>
    <div>
        <div class="box" ng-repeat='(k,v) in obj' ng-class="$index==now?'current':''">
            {{v}}
        </div>
    </div>
</div>
    
    <script>
        var vm = angular.module('model',[]);
        vm.controller('ctrl',['$scope',function($scope){
            $scope.now = 0;
            $scope.obj = {
                '便签1': 'number1',
                '便签2': 'number2',
                '便签3': 'number3'
            }
            $scope.setIndex=function(index){
                  $scope.now = index;
            }
        }]);
    </script>
</body>
</html>